package com.insta.achilog.dal;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;

public class UsersRequest {

	public static ResultSet getUser(String login, String pwd) {
		Statement statement;
		ResultSet resultat = null;
			
		Connection connexion = Connexion.getInitConnexion();

		try {
			statement = connexion.createStatement();

			resultat = statement
					.executeQuery("SELECT * FROM t_utilisateurs WHERE uti_login ="+ login +" AND uti_password ="+pwd);

//			while (resultat.next()) {
//				System.out.println(resultat.getString("uti_nom") + " "
//						+ resultat.getString("uti_prenom"));
//			}
			
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		return resultat;
	}


	public static void addUser(String login, String pwd, String nom, String prenom, Boolean droit)
	{
	
	}
	
	public static void setUser(String id, String login, String pwd, String nom, String prenom, Boolean droit)
	{
		
	}
	
	public static void removeUser(String login)
	{
		
	}


}